import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import 'normalize.css'
import './assets/css/base.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import "element-plus/theme-chalk/el-message.css";
import "element-plus/theme-chalk/el-message-box.css";

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 挂载全局
import echarts from '@/plugins/echarts'
// 方法一
// app.config.globalProperties.$echarts=echarts

// 方法二
app.provide('echarts',echarts)

// element分页组件英文转中文
import ElementPlus from 'element-plus';
import locale from 'element-plus/lib/locale/lang/zh-cn';

//引入到 main.js 文件中
import lodash from "lodash";
// import { debounce } from "lodash-es";
// 将全局lodash对象指向给Vue作用域下
app.config.globalProperties.$lodash = lodash; 

app.use(ElementPlus,{locale})

// 导入pinia
import { createPinia } from "pinia";
app.use(createPinia())

// 导入面包屑组件
import Breadcrumb from '@/components/Breadcrumb'
app.component('Breadcrumb',Breadcrumb )

app.use(router).mount('#app')
